pkg_name=lynx
major=2
minor=8
micro=9
v_dev=4
version=$major-$minor-$micro
build_dir=$builds_dir_root/$pkg_name-$version
src_dir=$src_dir_root/$pkg_name$version
archive_name=$pkg_name$major.$minor.${micro}dev.$v_dev.tar.bz2
url=http://lynx.isc.org/current/$archive_name

cd "$src_dir_root"
rm -Rf "$pkg_name$version"
tar jxf "$archive_name"

rm -Rf "$build_dir"
mkdir -p "$build_dir"
cd "$build_dir"

#we don't enable idn support since it's the old version
#of the libidn and not libidn2
#nls is broken
export CFLAGS=-O0
"$src_dir/configure"			\
	--prefix=			\
	--disable-debug			\
	--disable-trace 		\
	--disable-vertrace		\
	--disable-warnings		\
	--enable-largefile		\
	--disable-nls			\
	--without-included-gettext	\
	--disable-full-paths		\
	--without-ssl			\
	--with-gnutls			\
	--disable-gnutls-compat		\
	--without-socks			\
	--without-socks5		\
	--with-pkg-config		\
	--enable-ipv6			\
	--with-screen=ncursesw		\
	--enable-widec			\
	--enable-color-style		\
	--enable-htmlized-cfg		\
	--disable-local-docs		\
	--enable-locale-charset		\
	--disable-bibp-urls		\
	--enable-config-info		\
	--enable-forms-options		\
	--disable-menu-options		\
	--disable-sessions		\
	--disable-session-cache		\
	--disable-addrlist-page		\
	--disable-cjk			\
	--enable-japanese-utf8		\
	--enable-default-colors		\
	--disable-kbd-layout		\
	--enable-nested-tables		\
	--disable-alt-bindings		\
	--disable-ascii-ctypes		\
	--disable-extended-dtd		\
	--enable-file-upload		\
	--disable-idna			\
	--enable-justify-elts		\
	--disable-partial		\
	--enable-persistent-cookies	\
	--enable-prettysrc		\
	--enable-progressbar		\
	--enable-read-eta		\
	--disable-source-cache		\
	--disable-scrollbar		\
	--enable-charset-choice		\
	--enable-externs		\
	--disable-font-switch		\
	--disable-cgi-links		\
	--disable-change-exec		\
	--disable-exec-links		\
	--disable-exec-scripts		\
	--enable-internal-links		\
	--enable-nsl-fork		\
	--disable-syslog		\
	--enable-underlines		\
	--disable-gzip-help		\
	--with-bzlib			\
	--with-zlib			\
	--disable-finger		\
	--disable-gopher		\
	--disable-news			\
	--enable-ftp			\
	--disable-wais			\
	--enable-dired			\
	--enable-dired-dearchive	\
	--disable-dired-override	\
	--disable-dired-permit		\
	--disable-dired-xpermit		\
	--enable-dired-tar		\
	--disable-dired-uudecode	\
	--disable-dired-zip		\
	--enable-dired-gzip		\
	--enable-long-list		\
	--enable-parent-dir-refs	\
	--without-x			\
	--without-Xaw3d			\
	--without-Xaw3dxft		\
	--without-neXtaw		\
	--without-XawPlus		\
	--disable-rpath-hack

unset CFLAGS

make

install_tmp_dir=/tmp/$pkg_name-$version
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install "DESTDIR=$install_tmp_dir"

install_dirs "$builders_dir_root/$pkg_name/runtime.dirs"
install_files "$builders_dir_root/$pkg_name/runtime.files" "$install_tmp_dir"
elf_strip "$builders_dir_root/$pkg_name/elf-strip"

rm -Rf "$install_tmp_dir"
rm -Rf "$build_dir"
rm -Rf "$src_dir"
